@echo off
echo Testing workflow API...

REM Get token
curl -X POST "http://localhost:8080/login" -H "Content-Type: application/json" -d "{\"username\":\"admin\",\"password\":\"admin123\",\"code\":\"\",\"uuid\":\"\"}" > token_response.json

REM Extract token (simplified - in real scenario you'd parse JSON)
echo Token obtained, testing apply endpoint...

REM Test apply endpoint
curl -X POST "http://localhost:8080/system/management/apply" -H "Content-Type: application/json" -H "Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiMzk2OWI4ZmUtMGI3Zi00Yzk4LWI2YzUtZTg2ZjhhYzFlYWQyIn0.gduKAUhCmXR1DNnT-_2UczyDfHfZq7Puk75M3USoKcIGknfFyfBMy0qwnwlwxEO2kigP1v-hu2wX9jPT2rLbNQ" -d @test_apply.json > apply_response.json

echo Apply response:
type apply_response.json

pause
